Cursor Pty Brain Flaps#565
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Review limit reached
More reviews will be available in 20 minutes and 21 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@copilot review but do not make fixes |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Describe the change.
What Changed
Key files and behaviors.
Validation
How you tested.
Risks
Anything to watch.
Greptile Summary
This PR changes how Cursor CLI sessions receive their initial prompt: instead of embedding the prompt (and ADE guidance) as a trailing command-line argument to
cursor-agent, the text is now submitted through PTY input after the interactive CLI is ready, with a 750 ms readiness delay. Empty Cursor launches no longer auto-submit ADE guidance as the first turn.cliLaunch.ts: The Cursor branch ofbuildTrackedCliLaunchCommanddrops the prompt fromargsand conditionally setsinitialInput/initialInputDelayMs: 750only when aninitialPromptis present; empty launches produce a clean idle session.cliLaunch.test.ts,adeRpcServer.test.ts,syncRemoteCommandService.test.ts,AgentChatPane.test.tsx): All relevant assertions flipped from checking prompt membership inargsto checkinginitialInput/initialInputDelayMs, and a new test case covers the empty-launch idle path.README.md,pty-and-processes.md, andui-surfaces.mdupdated to describe the new launch strategy and the selective ADE guidance injection for Cursor.Confidence Score: 5/5
Safe to merge; the fresh-launch path for Cursor is cleanly implemented and thoroughly tested across all relevant test suites.
All changed test assertions are consistent with the implementation. The one area worth a follow-up is whether buildTrackedCliResumeCommand for Cursor (unchanged in this PR) also needs to stop appending the prompt to args, given the docs now describe that path as prompt-free — but that is a documentation/code alignment question for the resume path, not a defect in the fresh-launch change being shipped here.
The resume branch for Cursor in buildTrackedCliResumeCommand (cliLaunch.ts lines 803–819) may be worth a follow-up to confirm it aligns with the updated docs.
Important Files Changed
Sequence Diagram
sequenceDiagram participant ADE as ADE Runtime participant Builder as buildTrackedCliLaunchCommand participant PTY as PTY Service participant Cursor as cursor-agent process ADE->>Builder: "provider="cursor", initialPrompt?" alt initialPrompt present Builder-->>ADE: "{ args:[--mode,--model,...], initialInput:"ADE guidance\nUser prompt", initialInputDelayMs:750 }" ADE->>PTY: "create(command="cursor-agent", args, initialInput, initialInputDelayMs=750)" PTY->>Cursor: spawn cursor-agent [--mode] [--model] Cursor-->>PTY: interactive prompt ready PTY->>Cursor: write initialInput after 750ms delay else no initialPrompt (empty launch) Builder-->>ADE: "{ args:[--model,...] } — no initialInput" ADE->>PTY: "create(command="cursor-agent", args)" PTY->>Cursor: spawn cursor-agent [--model] — idle, awaits user endReviews (2): Last reviewed commit: "Fix Cursor Work draft launch tests" | Re-trigger Greptile